package com.tripwego.client.event;

import com.google.gwt.event.shared.GwtEvent;

public class ExpandCollapseEvent extends GwtEvent<ExpandCollapseEventHandler> {

	public static Type<ExpandCollapseEventHandler> TYPE = new Type<ExpandCollapseEventHandler>();

	private boolean expand;

	public ExpandCollapseEvent(boolean expand) {
		this.expand = expand;
	}

	@Override
	public Type<ExpandCollapseEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ExpandCollapseEventHandler handler) {
		handler.handleExpandCollapseEvent(this);
	}

	/**
	 * @return the expand
	 */
	public boolean isExpand() {
		return expand;
	}

	/**
	 * @param expand
	 *            the expand to set
	 */
	public void setExpand(boolean expand) {
		this.expand = expand;
	}

}